<?php !defined('DYHB_PATH') && exit; /* DoYouHaoBaby Framework 模板缓存文件 生成时间：2011-05-28 11:28:38  */ ?>
<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_header.html" ,"" ,"" ,"" )  ;?>

<script type="text/javascript">
<!--
function saveAccess(){

   Dyhb.AjaxSubmit('form1','<?php echo( G::U('role/set_action') );?>');
}
//-->
</script>

<script type="text/javascript" src="<?php echo __LIBCOM__;?>/Js/Vendor/Form/ManySelect.js"></script>

<style type="text/css">
<!--
.dyhbManySelect {
    overflow: auto;
    border: 2px inset white;
}
.dyhbManySelect_option {
    border-bottom: 1px solid #eeeeee;
    font: 10pt Tahoma;
    padding: 1px;
    padding-left: 20px;
}
// -->
</style>

   <!-- 标题  -->
   <div class="title"><?php print G::L( "操作授权", null, null ) ; ?> ( <a href="<?php echo( G::U('role/index') );?>"><?php print G::L( "返回角色列表", null, null ) ; ?></a> | <a href="<?php echo( G::U('role/user?id='.$nGroupId) );?>"><?php print G::L( "用户授权", null, null ) ; ?></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
      <form method="post" id="form1" name='form1'>
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="access"><?php print G::L( "授权", null, null ) ; ?>：</label></th>
            <td class="importent"><a id="access" href="<?php echo( G::U('role/app?group_id='.$nGroupId) );?>"><?php print G::L( "项目授权", null, null ) ; ?></a> | <a href="<?php echo( G::U('role/module?group_id='.$nGroupId) );?>"><?php print G::L( "模块授权", null, null ) ; ?></a> | <span><?php print G::L( "操作授权", null, null ) ; ?></span>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="group_id"><?php print G::L( "当前组", null, null ) ; ?>：</label></th>
            <td><select id="" name="group_id" onchange="location.href = '__ACTION__/group_id/'+this.options[this.selectedIndex].value;" ondblclick="" class="field" >
                <option value="" ><?php print G::L( "选择组", null, null ) ; ?></option>
                <?php $i=1 ;?>
<?php if( is_array( $arrGroupList ) ) : foreach( $arrGroupList as $key=>$value): ?>

                <option value="<?php echo( $key ); ?>" <?php if( $nSelectGroupId==$key ) :?>selected="selected"<?php endif; ?>><?php echo( $value ); ?></option>
                
<?php $i++ ;?>
<?php endforeach;endif; ?>
                </select>
                <div class="description"><?php print G::L( "系统组列表，下拉选择", null, null ) ; ?></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="appId"><?php print G::L( "当前应用", null, null ) ; ?>：</label></th>
            <td><select id="appId" name="appId" onchange="location.href = '__ACTION__/group_id/<?php echo( $nGroupId ); ?>/app_id/'+this.options[this.selectedIndex].value;" ondblclick="" class="medium" >
                <option value="" ><?php print G::L( "选择应用", null, null ) ; ?></option>
                <?php $i=1 ;?>
<?php if( is_array( $arrAppList ) ) : foreach( $arrAppList as $key=>$value): ?>

                <option value="<?php echo( $key ); ?>" <?php if( $nSelectAppId==$key ) :?>selected="selected"<?php endif; ?>><?php echo( $value ); ?></option>
                
<?php $i++ ;?>
<?php endforeach;endif; ?>
                </select>
                <div class="description"><?php print G::L( "选中组的应用列表", null, null ) ; ?></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="moduleId"><?php print G::L( "选择模块", null, null ) ; ?>：</label></th>
            <td><select id="moduleId" name="moduleId" onchange="location.href = '__ACTION__/group_id/<?php echo( $nGroupId ); ?>/app_id/<?php echo( $nAppId ); ?>/module_id/'+this.options[this.selectedIndex].value;" ondblclick="" class="medium" >
                <option value="" ><?php print G::L( "选择模块", null, null ) ; ?></option>
                <?php $i=1 ;?>
<?php if( is_array( $arrModuleList ) ) : foreach( $arrModuleList as $key=>$value): ?>

                <option value="<?php echo( $key ); ?>" <?php if( $nSelectModuleId==$key ) :?>selected="selected"<?php endif; ?>><?php echo( $value ); ?></option>
                
<?php $i++ ;?>
<?php endforeach;endif; ?>
                </select>
                <div class="description"><?php print G::L( "选中应用的模块列表", null, null ) ; ?></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="groupActionId"><?php print G::L( "方法", null, null ) ; ?>：</label></th>
            <td><select id="groupActionId" name="groupActionId[]" ondblclick="" onchange="" multiple="multiple" class="field" size="15" style="width: 200px; height: 200px">
                <?php $i=1 ;?>
<?php if( is_array( $arrActionList ) ) : foreach( $arrActionList as $key=>$value): ?>

                 <option <?php if( in_array($key,$arrGroupActionList) ) :?>selected="selected"<?php endif; ?> value="<?php echo( $key ); ?>"><?php echo( $value ); ?></option>
                
<?php $i++ ;?>
<?php endforeach;endif; ?>
                </select>
                <div class="description"><?php print G::L( "选中模块的方法列表", null, null ) ; ?></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="field"><?php print G::L( "操作", null, null ) ; ?>：</label></th>
            <td><input type="button" onclick="selectAll()" value="<?php print G::L( "全 选", null, null ) ; ?>" class="field">&nbsp;
             <input type="button" onclick="inverSelect()" value="<?php print G::L( "反 选", null, null ) ; ?>" class="field">&nbsp;
             <input type="button" onclick="unSelectAll()" value="<?php print G::L( "全 否", null, null ) ; ?>" class="field">&nbsp;
             <input type="button" onclick="saveAccess()" value="<?php print G::L( "保 存", null, null ) ; ?>" class="field">&nbsp;
             <input type="hidden" name="group_id" VALUE="<?php echo( $nGroupId ); ?>" >
             <input type="hidden" name="access_module" value="node">
             <input type="hidden" name="ajax" VALUE="1">
            </td>
          </tr>

          </table>
        </form>
   </div>
   <!-- end content -->

<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_footer.html" ,"" ,"" ,"" )  ;?>